package com.xx.sparkhbase

import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path
import org.apache.hadoop.hbase.tool.LoadIncrementalHFiles
import org.apache.hadoop.hbase.util.Bytes
import org.apache.hadoop.hbase.{HBaseConfiguration, TableName}

/**
 *
 * safe集群
 *
 * @author tzp
 * @since 2022/6/20
 */
object BulkLoad1 {
  val tableName = "dataeco-test"
  //  val stagingFolder = "hdfs://namenode.safe.lycc.qihoo.net:9000/home/hdp-dataeco-data/hbasetest1"
  //  val stagingFolder = "hdfs://10.160.228.94:9000/home/hdp-dataeco-data/hbasetest1"
  val stagingFolder = "/home/hdp-dataeco-data/hbasetest1"
  val family: Array[Byte] = Bytes.toBytes("e")

  def main(args: Array[String]): Unit = {
    val c = new Configuration()
    c.addResource("core-site.xml")
    val config = HBaseConfiguration.create(c)



    //    val loadTool = BulkLoadHFiles.create(config)
    //    loadTool.bulkLoad(TableName.valueOf(tableName), new Path(stagingFolder))
  }
}
